<html>
<head>
	<title>Excersise 1</title>
	<!--<link href="styles/js-console.css" rel="stylesheet" /> -->
</head>
<body>
	<div id="js-console"></div>
	<!--<script src="scripts/js-console.js"></script> -->
	<script>

function Solve(args) {
//var args = new Array ("7","1","2","-3","4","4","0","1");
//var args = new Array ("6","1","3","-5","8","7","-6");
//var args = new Array ("9","1","8","8","7","6","5","7","7","6");
var input = new Array();
var counter=0;
var flag=0;
var i, j;
for (i=0;i<args.length;i++)
{
	input[i] = parseInt(args[i]);	
}
for(j=1;j<input.length;j++)
{
	if(input[j]<=input[j+1])
	{
		flag=1;
	}
	else
	{
	if(flag=1)
		{
		counter++;
		flag=0;
		}
	}
}
return counter;
}
Solve();
	</script>
</body>
</html>
